package com.ssy.lingxi.member.merchant.repository;

import com.ssy.lingxi.member.merchant.entity.BaseLevelRuleDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 基础升级规则Repository
 * @author 万宁
 * @version 2.0.0
 * @date 2020-08-23
 */
@Repository
public interface BaseLevelRuleRepository extends JpaRepository<BaseLevelRuleDO, Long>, JpaSpecificationExecutor<BaseLevelRuleDO> {
    BaseLevelRuleDO findFirstByRuleTypeEnumAndMemberLevelTypeEnum(Integer ruleTypeEnum, Integer memberLevelTypeEnum);

    List<BaseLevelRuleDO> findByMemberLevelTypeEnumAndStatus(Integer memberLevelTypeEnum, Integer status);

    List<BaseLevelRuleDO> findByMemberLevelTypeEnumNotAndStatus(Integer memberLevelTypeEnum, Integer status);
}
